<style>
.tlabel{text-align: right; font-weight: bold; padding: 4px;}
</style>

<h1><%= @torrent.name %></h1>

<table width="90%" cellpadding="0" cellspacing="0">
		<tr>
			<td width="120px;" class="tlabel">Download</td>
			<td><%= link_to(@torrent.filename, torrent_dl(@torrent)) %></td>
		</tr>
		<tr>
			<td class="tlabel">Info hash</td>
			<td><%= @torrent.info_hash %></td>
		</tr>
		<tr>
			<td class="tlabel">Description</td>
			<td><%= auto_link(simple_format(@torrent.description)) %></td>
		</tr>
		<tr>
			<td class="tlabel">Category</td>
			<td><%= link_to(@torrent.category.name, {:controller => 'torrent', :action => 'browse', :cat => @torrent.category_id}) %></td>
		</tr>
		<tr>
			<td class="tlabel">Size</td>
			<td><%= number_to_human_size(@torrent.size)%> (<%= number_with_delimiter(@torrent.size) %> bytes)</td>
		</tr>
		<tr>
			<td class="tlabel">Added</td>
			<td><%= @torrent.created_at %></td>
		</tr>
		<tr>
			<td class="tlabel">Views</td>
			<td><%= @torrent.views %></td>
		</tr>
		<tr>
			<td class="tlabel">Activity</td>
			<td><%= pluralize(@torrent.seeders, 'seeder') %>, <%= pluralize(@torrent.leechers, 'leecher') %></td>
		</tr>
		<tr>
			<td class="tlabel">Snatched</td>
			<td><%= pluralize(@torrent.times_completed, 'time') %></td>
		</tr>
		<tr>
			<td class="tlabel">Files</td>
			<td><%= pluralize(@torrent.numfiles, 'file') %>
				
				<div id="show_files_link"><i><%= link_to_function('[Show full list]', "showFileList(#{@torrent.id})") %></i></div>
				<div id="hide_files_link" style="display: none;"><i><%= link_to_function('[Hide full list]', "toggleFileListOff()") %></i></div>
				
				<div id="file_list" style="margin-top: 5px; margin-bottom: 5px;"></div>
			
			</td>
		</tr>
</table>
<br/><br/>
<%= render :partial => 'comment/comments', :locals => {:comments => @comments, :torrent => @torrent} %>
<br/><br/>

